package org.nuaa.shr.core;

import java.util.ArrayList;
import java.util.List;

public class Solution {
	private int[] objectives;
	private List<Integer> variables;
	private int[] coordinates;
	private boolean isViolate = false;
	
	private int[] constraints;
	
	public Solution(int numberOfObjectives){
		objectives = new int[numberOfObjectives];
		coordinates = new int[numberOfObjectives];
		variables = new ArrayList<>();
		constraints = new int[numberOfObjectives];
	}
	
	public void setConstrain(int i, int value){
		constraints[i] = value;
	}
	public int getConstrain(int i){
		return constraints[i] ;
	}
	
	public void setVariables(int i, int value){
		variables.set(i, value);
	}
	
	public void setCoordinates(int i, int value){
		coordinates[i] = value;
	}
	
	public int getCoordinates(int i){
		return coordinates[i];
	}
	
	public int getObjectives(int i){
		return objectives[i];
	}
	
	public void setObjectives(int i, int value){
		objectives[i] = value;
	}
	public int getNumberOfObjective(){
		return objectives.length;
	}
	
	public int getNumberOfVariables(){
		return variables.size();
	}
	
	public boolean isViolate(){
		return isViolate;
	}

	public int getVariable(int i) {
		return variables.get(i);
	}
}
